import request from '@/utils/request'

// 查询银行列表
export function listBank (query) {
  return request({
    url: '/system/bank/list',
    method: 'get',
    params: query
  })
}

// 查询银行详细
export function getBank (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/system/bank/getInfo',
    method: 'get',
    params: params
  })
}

// 新增银行
export function addBank (data) {
  return request({
    url: '/system/bank/insert',
    method: 'post',
    data: data
  })
}

// 修改银行
export function updateBank (data) {
  return request({
    url: '/system/bank/update',
    method: 'post',
    data: data
  })
}

// 删除银行
export function delBank (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/system/bank/delete',
    method: 'post',
    params: params
  })
}
// 批量删除银行
export function delBatchBank (ids) {
  const params = {
    'ids': ids
  }
  return request({
    url: '/system/bank/deleteBatch',
    method: 'post',
    params: params
  })
}

// 导入银行
export function importData (data) {
  return request({
    url: '/system/bank/importData',
    method: 'post',
    data: data
  })
}
